#pragma once
#include "_COMMON_DATA_.h"
#include "_MT_SAFE_.h"
#include "DL_COM.h"

struct _PACKING_CONF_
{
	UINT	version;
	UINT	mtu = 1024;
	BOOL	Fec = FALSE;
};

class Packing : public DL_COM
{
protected:
			Packing()										= default;
public:
	using	PK_FUNC		= std::function<BOOL(_COMMON_DATA_ const &)>;
	using	PACK_DATA	= _MT_SAFE_<_STREAM_DATA_<std::vector>>;
	using	PACK_FUNC	= _MT_SAFE_<PK_FUNC>;
	virtual ~Packing()										= default;
	virtual PACK_FUNC* const get_push(_DATA_TYPE_)			= 0;
	virtual PACK_DATA* const get_data(_DATA_TYPE_)			= 0;
	virtual DL_RET exec(DL_CMD, DL_PARAM_IN = nullptr)	= 0;
};